<script setup>
import {ref} from "vue";
const money = ref(2000)
const borrow = ($parent) => {
  console.log($parent)
  $parent.money -= 50
  money.value += 50
}

</script>

<template>
  <div class="content">
    我是女儿孙尚香，我有{{money}}元
    <button @click="borrow($parent)">找我爸V我50</button>
  </div>
</template>

<style scoped>
.content {
  width: 400px;
  height: 400px;
  background-color: aliceblue;
}
</style>
